package com.ticket.system.service;

import com.ticket.system.domain.YanchuOrderDetail;
import com.ticket.system.domain.vo.OrderDetailVo;
import com.ticket.system.domain.vo.WatchRecordVo;

import java.util.List;
import java.util.Map;

/**
 * 订单详情Service接口
 * 
 * @author ruoyi
 * @date 2023-09-26
 */
public interface IYanchuOrderDetailService 
{
    /**
     * 查询订单详情
     * 
     * @param id 订单详情主键
     * @return 订单详情
     */
    public YanchuOrderDetail selectYanchuOrderDetailById(Long id);

    public OrderDetailVo selectOrderDetailVoById(Long id);

    /**
     * 查询订单详情列表
     * 
     * @param yanchuOrderDetail 订单详情
     * @return 订单详情集合
     */
    public List<YanchuOrderDetail> selectYanchuOrderDetailList(YanchuOrderDetail yanchuOrderDetail);

    public List<OrderDetailVo> selectOrderDetailVoList(Long sessionId,Integer status,String userName,Long orderId);

    public List<OrderDetailVo> selectOrderDetailCancelVoList(Long sessionId,Integer status,String userName);


//    public List<OrderDetailVo> selectMyOrderDetailVoList(Integer status);

    /**
     * 新增订单详情
     * 
     * @param yanchuOrderDetail 订单详情
     * @return 结果
     */
    public int insertYanchuOrderDetail(YanchuOrderDetail yanchuOrderDetail);

    /**
     * 修改订单详情
     * 
     * @param yanchuOrderDetail 订单详情
     * @return 结果
     */
    public int updateYanchuOrderDetail(YanchuOrderDetail yanchuOrderDetail);

    /**
     * 批量删除订单详情
     * 
     * @param ids 需要删除的订单详情主键集合
     * @return 结果
     */
    public int deleteYanchuOrderDetailByIds(Long[] ids);

    /**
     * 删除订单详情信息
     * 
     * @param id 订单详情主键
     * @return 结果
     */
    public int deleteYanchuOrderDetailById(Long id);

    public String createScanQrcode(Long detailId);

    public int ticketCheck(String code,Long userId,Long sessionId);

    public int ticketNoCheck(String ticketNo,Long userId,Long sessionId);

    /**
     * 根据订单id查询订单详情
     *
     * @param orderId 订单id
     * @return
     */
    public List<OrderDetailVo> selectOrderDetailByOrderId(Long orderId);

    public Map<String,Integer> ticketCheckStat(Long userId);

    /**
     * 核验记录
     *
     * @param sessionId
     * @param keyName
     * @param userId
     * @param state
     * @return
     */
    List<YanchuOrderDetail> tickerVerification(Long sessionId, String keyName, Long userId, Integer state);

    public YanchuOrderDetail selectOrderDetailByTicketNo(String ticketNo);

    List<WatchRecordVo> myWatchRecord(Long userId, Long userinfoId, String phonenumber);
}
